package com.template.server.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;

/**
 * @author liuxf
 * @date 2024/4/12
 */
@Configuration
@Import(BeanValidatorPluginsConfiguration.class)
@EnableSwagger2WebMvc
public class Knife4jConfig {

    @Value("${spring.application.name}")
    private String title;

   /* @Bean
    public Docket docket() {
        return new Docket(DocumentationType.SWAGGER_2)
                .enable(true)
                .apiInfo(new ApiInfoBuilder()
                        .title("")
                        .description("#简介")
                        .termsOfServiceUrl("API服务条款")
                        .contact(new Contact(
                                "作者",
                                "个人网站",
                                "邮箱"
                        ))
                        .version("版本号")
                        .build()
                )
                //分组名称
                .groupName("分组")
                .select()
                //这里指定Controller扫描包路径
                .apis(
                        RequestHandlerSelectors
                                .basePackage("com.template.server.controller")
                )
                .paths(PathSelectors.any())
                .build();
    }*/

}
